package com.six.day1;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class DeserializeDemo {
    public static void main(String[] args) {
        //反序列化 - User
        try{
            FileInputStream fis = new FileInputStream("D:\\新建文件夹 (2)\\ideaprojects\\stx_six_lty\\src\\com\\six\\User.txt");
            ObjectInputStream ois =new ObjectInputStream(fis);
            User user = (User) ois.readObject();
            System.out.println(user);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
